import request from '@/config/axios'

// 微信视频号直播记录 VO
export interface WeixinvideoLiverecordVO {
  id: number // 主键
  exportId: string // 直播id
  description: string // 直播描述
  coverUrl: string // 直播封面
  nickname: string // 开播视频号昵称
  headUrl: string // 开播视频号头像
}

// 微信视频号直播记录 API
export const WeixinvideoLiverecordApi = {
  // 查询微信视频号直播记录分页
  getWeixinvideoLiverecordPage: async (params: any) => {
    return await request.get({ url: `/integration/weixinvideo-liverecord/page`, params })
  },

  // 查询微信视频号直播记录详情
  getWeixinvideoLiverecord: async (id: number) => {
    return await request.get({ url: `/integration/weixinvideo-liverecord/get?id=` + id })
  },

  // 新增微信视频号直播记录
  createWeixinvideoLiverecord: async (data: WeixinvideoLiverecordVO) => {
    return await request.post({ url: `/integration/weixinvideo-liverecord/create`, data })
  },

  // 修改微信视频号直播记录
  updateWeixinvideoLiverecord: async (data: WeixinvideoLiverecordVO) => {
    return await request.post({ url: `/integration/weixinvideo-liverecord/update`, data })
  },

  // 删除微信视频号直播记录
  deleteWeixinvideoLiverecord: async (id: number) => {
    return await request.get({ url: `/integration/weixinvideo-liverecord/delete?id=` + id })
  },

  // 导出微信视频号直播记录 Excel
  exportWeixinvideoLiverecord: async (params) => {
    return await request.download({ url: `/integration/weixinvideo-liverecord/export-excel`, params })
  }
}